<template>
  <div class="userAdd" style="height: 50%;width: 400px">
    <el-dialog v-bind="$attrs" :visible.sync="showDialog" v-on="$listeners" @open="onOpen" @close="onClose" title="">
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in cities"
                :key="item.value"
                :label="item.label"
                :value="item.value">
                <span style="float: left">{{ item.label }}</span>
                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
              </el-option>
            </el-select>
      <div slot="footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="handelConfirm">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
name: "AddUserSmail",
  data(){
    return{
      showDialog: false,
      userVO:{},
      cities: [{
        value: 'Beijing',
        label: '北京'
      }, {
        value: 'Shanghai',
        label: '上海'
      }, {
        value: 'Nanjing',
        label: '南京'
      }, {
        value: 'Chengdu',
        label: '成都'
      }, {
        value: 'Shenzhen',
        label: '深圳'
      }, {
        value: 'Guangzhou',
        label: '广州'
      }],
      value: '',

    }
  },
  props:{
    userAddVisible:{
      type : Boolean,
      default:false
    },
  },
  watch:{
    userAddVisible:function (){
      this.showDialog = this.userAddVisible
    }
  },
  methods:{
    onOpen() {},
    onClose() {
      // this.$refs['elForm'].resetFields()
      console.log("onClose");
      this.$emit('changeShow','false')

    },
    close() {
      console.log("Close");
      this.$emit('changeShow','false')
    },
    handelConfirm(){

    }
  }
}
</script>

<style scoped>

</style>
